package cn.edu.nju.software.greencreditsystem.factory;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

/**
 * 作者：何启睿
 * 创建时间：2011-8-2
 * 类描述：提供访问数据库的Session的工厂类
 */
public class SessionPool 
{
    private static SessionFactory factory = new Configuration().configure().buildSessionFactory();
    
    public static Session getSession()
    {
        return factory.openSession();
    }
}
